import { initFormFieldsValue } from '@/utils/bizUtils'
// 订单来源
const SOURCE_ORDER = [
  { value: 10, label: '人工发起' },
  { value: 20, label: '自进货' },
  { value: 30, label: '订货单' },
  { value: 40, label: '销售订单（服务商）' },
  { value: 50, label: '单笔合同' },
  { value: 60, label: '囤货订单' },
]
// 状态
const STATE_OPTIONS = [
  { value: 10, label: '待处理' },
  { value: 20, label: '暂存' },
  { value: 30, label: '退回' },
  { value: 40, label: '待审核' },
  { value: 50, label: '驳回' },
  { value: 60, label: '待审批' },
  { value: 70, label: '已处理' },
]
// 异常类型
const ABNORMAL_TYPE_OPTIONS = [
  { value: 1, label: '全部' },
  { value: 2, label: '渠道异常' },
  { value: 3, label: '价格异常' },
]
// 查询条件
const FORM_ITEMS = [
  {
    prop: 'disposeStatusList',
    label: '处理状态',
    type: 'select',
    multiple: true,
    options: STATE_OPTIONS
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input'
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input'
  },
  {
    prop: 'purchaseOrderNo',
    label: '订单号',
    type: 'input'
  },
  {
    prop: 'orderSource',
    label: '订单来源',
    type: 'select',
    options: SOURCE_ORDER
  },
  {
    prop: 'supplierBelongCenter',
    label: '供应商归属中心',
    type: 'input',
  },
  {
    prop: 'supplierManagementArea',
    label: '供应商管理区域',
    type: 'input',
  },
  {
    prop: 'productBelongCenter',
    label: '商品归属中心',
    type: 'input',
  },
  {
    prop: 'saveUser',
    label: '暂存人',
    type: 'input',
  },
  {
    prop: 'skuCode',
    label: '商品代码',
    type: 'input',
  },
  {
    prop: 'takeupGoodsUser',
    label: '订货人',
    type: 'input',
  },
]
// 初始化formData
const FORM_DATA = initFormFieldsValue(FORM_ITEMS)

export {
  FORM_ITEMS,
  FORM_DATA,
  ABNORMAL_TYPE_OPTIONS
}
